package svc

import (
	"mall/service/attachment/api/internal/config"
	"mall/service/attachment/rpc/attachmentclient"

	"github.com/zeromicro/go-zero/zrpc"
)

type ServiceContext struct {
	Config config.Config

	AttachmentRpc attachmentclient.Attachment
}

func NewServiceContext(c config.Config) *ServiceContext {
	return &ServiceContext{
		Config:        c,
		AttachmentRpc: attachmentclient.NewAttachment(zrpc.MustNewClient(c.AttachmentRpc)),
	}
}
